using System;
using BombermanControlador;
using Bomberman;
using System.Windows.Forms;
using System.Drawing;

namespace BombermanGame
{

    static class Program
    {
        static Game game;
        
	[STAThread]
	static void Main(string[] args)
	{

		Menu form = new Menu();
		//form.BackgroundImage = Image.FromFile(Application.StartupPath + @"\Bombermanii.png");
		form.Disposed += new EventHandler(form_Disposed);
		BombermanJuego juego = new BombermanJuego();
		juego.EmpezarJuego(30);
		
		Controlador controlador = new Controlador(juego);

		game = new Game(juego, form);

		form.Show();
		form.TopMost = true;
		game.BeforeUpdate += (sender, arg) =>
		{
			controlador.Start();
		};
			
			
		game.Run();

	}
      
	static void form_Disposed(object sender, EventArgs e)
	{
		game.Exit();
	}

    }

  }

